﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace ZenSystemService.Api.Migrations
{
    /// <inheritdoc />
    public partial class Course : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "TrainingItemId",
                table: "ProductTypes");

            migrationBuilder.RenameColumn(
                name: "Trainee",
                table: "Users",
                newName: "CoachId");

            migrationBuilder.AddColumn<int>(
                name: "ProductTypeId",
                table: "TrainingItems",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "InstitutionId",
                table: "Courses",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "Type",
                table: "CourseTypes",
                type: "int",
                nullable: false,
                defaultValue: 0);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ProductTypeId",
                table: "TrainingItems");

            migrationBuilder.DropColumn(
                name: "InstitutionId",
                table: "Courses");

            migrationBuilder.DropColumn(
                name: "Type",
                table: "CourseTypes");

            migrationBuilder.RenameColumn(
                name: "CoachId",
                table: "Users",
                newName: "Trainee");

            migrationBuilder.AddColumn<int>(
                name: "TrainingItemId",
                table: "ProductTypes",
                type: "int",
                nullable: false,
                defaultValue: 0);
        }
    }
}
